package com.nineclock.system.feign;
import com.nineclock.common.entity.Result;
import com.nineclock.sign.dto.SignDTO;
import com.nineclock.system.dto.SysCompanyUserDTO;
import com.nineclock.system.dto.SysUserDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author 黑马程序员
 * @Company http://www.ithiema.com
 * @Version 1.0
 */
@FeignClient("sys-service")
public interface SysUserFeign {

    @GetMapping("/user/query")
    public Result<SysUserDTO> queryUser(@RequestParam("username") String username);


    @GetMapping("/companyUser/query")
    public Result<List<SysCompanyUserDTO>> queryCompanyUser(
            @RequestParam("companyId") Long companyId,
            @RequestParam("userId") Long userId) ;



    @GetMapping("/companyUser/queryCompanyUser")
    public Result<SysCompanyUserDTO> queryCompanyUserByCompanyIdAndCompanyUserId(
            @RequestParam("companyId") Long companyId,
            @RequestParam("companyUserId") Long companyUserId);

    @GetMapping("/companyUser/queryAllCompanyUser")
    public Result<List<SysCompanyUserDTO>> queryAllCompanyUser();


    @GetMapping("/companyUser/queryUserByIds")
    public Result<List<SysCompanyUserDTO>> queryCompanyUserByIds(
            @RequestParam("ids") List<Long> ids);
    /**
     * 根据员工ID查询员工信息
     * @param companyUserId
     * @return
     */
    @GetMapping("/companyUser/query/{companyUserId}")
    public Result<SysCompanyUserDTO> queryByCompanyUserId(
            @PathVariable("companyUserId") Long companyUserId);



}
